<!--  -->
<template>
  <div class="page_body">
    <van-nav-bar title="公示中心" left-arrow @click-left="onClickLeft" />
    <div class="page_list">
      <div class="page_list_img">
        <img class="page_list_imgs" :src="this.record.photo" alt="" />
      </div>
      <div class="page_list_p1">
        <p class="p1">{{ this.record.name }}</p>
        <p class="p2">性别：{{ this.record.sex }}</p>
        <div class="p3">
          <p class="p3p1">
            认证有效期内：{{ this.record.coach_certified_date }}
          </p>
        </div>
      </div>
      <div
        class="page_list_p2"
        v-for="(item, index) in record.certificate_info"
        :key="index"
      >
        <div class="page_p2_p1">
          <span class="pagesd">教练员资质：</span>
          <span class="page_psd">
            {{ item.coach_certificate_title }}
            {{ item.coach_certificate_level }}
          </span>
        </div>
        <div class="page_p2_p1">
          <span class="pagesd">证书签发日期：</span>
          <span class="page_psd">
            {{ item.certificate_begin_date }}
          </span>
        </div>
      </div>
    </div>
  </div>
</template>
<style src="../../assets/css/searchCenter/search details.css" scoped></style>
<script>
import HomeTop from "@/components/homeTop.vue";
import { Indicator, Toast } from "mint-ui";
import { NavBar, Dialog } from "vant";
export default {
  name: "",
  components: {
    HomeTop,
    [NavBar.name]: NavBar,
    [Dialog.name]: Dialog,
  },
  data() {
    return {
      topTitle: "公示中心",
      type: "",
      record: {},
      coach_certificate_images: [],
      pics: [],
      dialogshowdig: false,
      imgurls: "",
    };
  },
  mounted() {
    this.Detail();
  },
  methods: {
    Detail() {
      let url = "/mobile/coachCertifiedDetail";
      let data = {
        id: this.$route.query.id,
      };
      Indicator.open();
      this.axios
        .post(url, data)
        .then((res) => {
          Indicator.close();
          if (res.code == 0) {
            this.record = res.coach;
            console.log(this.pics, "res");
          } else {
            Toast({
              message: res.msg,
              duration: 3000,
            });
          }
        })
        .catch(function (error) {
          Indicator.close();
          console.log(error);
        });
    },
    onClickLeft() {
      console.log("222");
      this.$router.push({
        name: "searchCenter",
        query: {
          id: this.$route.query.id,
          keywords: this.$route.query.keywords,
          active: this.$route.query.active,
          activess: this.$route.query.activess,
        },
      });
    },
    imgurl(img) {
      this.dialogshowdig = true;
      console.log(img);
      this.imgurls = img;
    },
  },
};
</script>

<style scoped lang='scss'>
</style>